package com.group.three.service.Impl;

import com.github.pagehelper.PageHelper;
import com.group.three.entity.OrderComplaint;
import com.group.three.entity.OrderComplaintVO;
import com.group.three.mapper.OrderComplaintMapper;
import com.group.three.service.OrderComplaintService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderComplaintServiceImpl implements OrderComplaintService {
    @Autowired
    private OrderComplaintMapper orderComplaintMapper;

    @Override
    public List<OrderComplaint> getOrderComplainByPage(int pageNum, int pageSize) {
        PageHelper.startPage(pageNum, pageSize);
        return orderComplaintMapper.getOrderComplainByPage(pageNum, pageSize);
    }

    @Override
    public OrderComplaintVO getOrderComplainById(String id) {
        return orderComplaintMapper.getOrderComplainById(id);
    }

    @Override
    public int addCommunication(String complainId, String content,String ownerId,String substring) {
        return orderComplaintMapper.addCommunication(complainId, content, ownerId,substring);
    }
}
